mui.init();

var aboutus;
mui.plusReady(function () {
   aboutus = new Vue({
        el: '#aboutus',
        data: {
            list:[],
            version: '',
        },
        mounted(){
            this.get_aboutus();
            this.$nextTick(function () {
		        mui('.mui-scroll-wrapper').scroll({
	            	indicators: false, //是否显示滚动条
	            	bounce: true, //是否启用回弹
					deceleration: 0.0005 //flick 减速系数，系数越大，滚动速度越慢，滚动距离越小，默认值0.0006
				});
		    })
            plus.runtime.getProperty(plus.runtime.appid, function (inf) {
                aboutus.version = inf.version;
            });
        },
        methods: {
            get_aboutus:function () {
                var api_host = plus.storage.getItem('HOST_URL');
                mui.ajax({
                    url:api_host+'/api/other/other/aboutus',
                    dataType:'json',
                    type:'get',
                    timeout:5000,
                    success:function(msg){
                    	if(msg.code==1){
                    		aboutus.list=msg.data;
                    	}
                    },
                    error:function () {
                        console.log('获取关于我们信息失败');
                    },
                })
            },
            goProtocol:function(){
            	mui.openWindow({
            		url: 'protocol.html',
                    createNew:false,
                    show: {
                        autoShow: true,
                        aniShow: 'pop-in',
                        duration: 400
                    },
                    waiting: {
                        autoShow: false,
                    }
            	})
            },
            callPhone:function (mobile) {
                window.location.href = 'tel:' + mobile;
            },
        }
    });
});